#!/usr/bin/env bash

action=$1

fn_pull(){
  git pull origin master:master
}

fn_migration(){
  python mig_way.py
}

conda=$(conda -V 2>/dev/null) || true

if [ $conda ]; then
  conda activate base
fi

if [ "$action" = "migration" ]; then
  fn_migration
elif [ "$action" = "pull" ]; then
  fn_pull
else
  fn_pull
  fn_migration
fi

exit 0
